<template>
    <div class="asider">
            <el-menu
                    default-active="2"
                    class="el-menu-vertical-demo"
                    @open="handleOpen"
                    @close="handleClose"
                    background-color="#545c64"
                    text-color="#fff"
                    active-text-color="#ffd04b">
                <el-submenu index="1">
                    <template slot="title">
                        <i class="el-icon-location"></i>
                        <span>文章</span>
                    </template>
                    <el-submenu index="1-4">
                        <template slot="title">文章</template>
                        <el-menu-item index="1-4-1">所有文章</el-menu-item>
                        <el-menu-item index="1-4-1">文章撰写</el-menu-item>
                    </el-submenu>
                    <el-menu-item-group>
                        <el-menu-item index="1-1">分类目录</el-menu-item>
                        <el-menu-item index="1-2">标签列表</el-menu-item>
                    </el-menu-item-group>
                </el-submenu>
                <el-menu-item index="2">
                    <i class="el-icon-menu"></i>
                    <span slot="title">导航二</span>
                </el-menu-item>
                <el-menu-item index="3">
                    <i class="el-icon-setting"></i>
                    <span slot="title">导航三</span>
                </el-menu-item>
            </el-menu>
    </div>
</template>

<script>
    export default{
        name: 'asider',
        data () {
            return {
                msg: 'asider'
            }
        },
        methods: {
            handleOpen(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClose(key, keyPath) {
                console.log(key, keyPath);
            }
        }
    }
</script>

<style>
    .asider{

    }
    .el-menu-vertical-demo{
        min-height: 800px !important;
    }
</style>